<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增产品分类')" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-partstype-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">类别名称：</label>
                <div class="col-sm-8">
                    <input name="typeName" autocomplete="off" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">上级名称：</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input id="treeId" name="pId" type="hidden" th:value="${zsyhPlatformPartstype?.id}"/>
                        <input class="form-control" type="text" id="treeName" readonly="true" th:value="${zsyhPlatformPartstype?.typeName}" >

                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">排序：</label>
                <div class="col-sm-8">
                    <input name="typeSort" autocomplete="off" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group" style="text-align: center">
                <p style="color: red;">注意：排序数字越大位置越靠后</p>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "zsyh/partstype"
        $("#form-partstype-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-partstype-add').serialize());
            }
        }

    </script>
</body>
</html>